home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-01-29 | 945 b | 40 lines | [TEXT/ToyS] |
- property TrashDesktopFullPath : "000000000000000000000000000"
-
-
-
- on run
- --
- -- Checks the TrashDesktopFullPath and asks for a valid path if an error occurs
- --
- try
- get info for file TrashDesktopFullPath
- on error
- set TrashDesktopFullPath to (choose file with prompt ¬
- "Choose Trash•Desktop program:" of type {"APPL"}) as string
- end try
-
- --
- -- Make a volume's list of alias
- --
- set allVolumeList to {}
- repeat with volumeName in list disks
- set allVolumeList to allVolumeList & (volumeName & ":" as alias)
- end repeat
-
- if TrashDesktopFullPath is not "" then
- try
- --set TrashDesktop to the name of (info for file TrashDesktopFullPath)
-
- --
- -- Launch Trash•Desktop with all mounted volumes and then it quits automatically
- --
- launch application TrashDesktopFullPath
- tell application TrashDesktopFullPath to open allVolumeList
-
- tell application "Finder" to restart
-
- on error
- end try
- end if
- end run
-